package main.java.com.zzxy.mvc12.controller;

import main.java.com.zzxy.mvc12.po.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/stu")

public class StuController {
    @RequestMapping("/add")
    public  String add() {
        return "/user/register";
    }
    @RequestMapping("/register")
    public @RequestBody Student register(@RequestBody Student student) {
        System.out.println(student);
        student.setUsername(student.getUsername()+ "34");
        student.setPassword(student.getPassword()+ "34");
        return  student;


    }
}
